package com.supergzt.utils;

/**
 * @author 张钧
 * @Description
 * @create 2022-10-21 8:08
 */
public class AssertUtils {

    public static void assertTrue(Boolean isTrue, RuntimeException runtimeException, Runnable runnable){
        if (!isTrue) {
            runnable.run();
            throw runtimeException;
        }
    }

    public static void assertTrue(Boolean isTrue, RuntimeException throwable){
        if (!isTrue) {
            throw throwable;
        }
    }
}
